package net.println.kotlin.chapter4.innerclass

interface OnClickListener {
    fun onClick()
}
class View {
    var onClickListener:OnClickListener? = null
}
open class Outter {
    var a = 0
    inner class Inner{
        val a = 5
        fun hello() {
            println(this@Outter.a)
        }
    }
}

fun main(args: Array<String>) {
    val inner = Outter().Inner()

    val view = View()
    view.onClickListener = object :Outter(), OnClickListener{//可以单继承多实现，java做不到这一点
        override fun onClick() {

        }

    }
}